package com.isscollage.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.isscollage.entity.OrderDetail;
import com.isscollage.entity.OrderHeader;
import com.isscollage.entity.TicketLog;
import com.isscollage.entity.TicketOrder;
import com.isscollage.search.OrderSearch;

public interface OrderDao {

	public boolean insert(TicketOrder ticketOrder);
	
	public boolean insertLog(TicketLog ticketLog);
	
	public List<TicketLog> searchLogById(Date putDate);
	
	public List<TicketOrder> searchTicketOrderByCon(OrderSearch orderSearch);
	
	public TicketOrder getTicketOrderById(String ticketOrderId);
	
	public boolean saveOrder(OrderHeader orderHeader);
	
	public boolean saveOrderDetail(OrderDetail orderDetail);
	
	public boolean updateTicketOrder(TicketOrder ticketOrder);
	
	public OrderHeader getOrderByOrderId(String orderId); 
	public OrderDetail getDetailByOrderId(String orderId);
	public boolean updateOrderFlagByOrderId(@Param("orderFlag") Integer orderFlag,@Param("orderId") String orderId);
	
	public boolean deleteOrderHeader(String orderId);
	public boolean deleteOrderDetail(String orderId);
	public List<TicketOrder> getTicketOrderByCon(@Param("ticketId") Integer ticketId,@Param("startTime") Date startTime);
	
	public List<OrderHeader> getOrderByUserId(String userId);
	
	public List<OrderHeader> searchOrderByCon(OrderSearch search);
	
	public OrderDetail getOrderDetailByDetailId(String detailId);
	
	public boolean updateOrderByDetailId(String detailId);
	
	public boolean updateOrderHeader(OrderHeader orderHeader);
	
	public boolean updateDetailByDetailId(String detailId);
	
	public boolean updateHeaderFlagByOrderId(String orderId);
	
	public boolean deleteOrderDetailByDetailId(String detailId);
}
